Script: --on windowEvent wdID,wdName,objNo,objName,objValue¬¬Global gExportFields, gAvailableExportFields, gExportOnlyIssuesInStock¬global gWindowPositions, gYears, serialNum, gExportInReportFormat¬global gIncludeExportFieldTitles¬¬---------------------¬-- This is window #8¬---------------------¬¬if objValue="Open" then ¬ -- Restore old window position¬ put OldWindowPosition(8) into windowRect¬ if windowRect = empty then centerWindow wdName¬ else wsSet wdID,"0","Rect",windowRect¬ ¬ ¬ -- Match up the actual years to the period fields¬ set the itemDelimiter to " " -- Option space¬ repeat with x = 1 to the number of lines of gYears¬ put line x of gYears into yearToMatch¬ ¬ put false into foundIt¬ repeat with listIndex = 1 to the number of lines of gExportFields¬ -- look in the Exportfields list¬ if item 1 of line listIndex of gExportFields = "Value-Year " & x then¬ delete item 2 of line listIndex of gExportFields¬ put " (" & yearToMatch & ")" after line listIndex of gExportFields¬ put true into foundIt¬ end if¬ end repeat¬ ¬ if not foundIt then¬ repeat with listIndex = 1 to the number of lines of gAvailableExportFields¬ if item 1 of line listIndex of gAvailableExportFields = "Value-Year " & x then¬ delete item 2 of line listIndex of gAvailableExportFields¬ put " (" & yearToMatch & ")" after line listIndex of gAvailableExportFields¬ end if¬ end repeat¬ end if¬ end repeat¬ ¬ ¬ wsSet wdID,"7","Name", "Move >>"¬ wsSet wdID,"ExportOrder","Text", gExportFields¬ wsSet wdID,"AvailableForExport","Text", gAvailableExportFields¬ if gAvailableExportFields ≠ empty then¬ wsSet wdID,"AvailableForExport","Selection", "1"¬ wsSet wdID,"7","Disabled", "False"¬ else¬ wsSet wdID,"AvailableForExport","Selection", "0"¬ wsSet wdID,"7","Disabled", "True"¬ end if¬ wsSet wdID,"Export","Disabled",((gExportFields = empty) or (serialNum = empty))¬else if objValue="Close" then ¬ -- save the window position¬ put "8" & tab & wdName & tab & wsGet(wdID,"0","Rect") into line 8 of gWindowPositions¬ ¬end if¬¬--end windowEvent
Balloon: These are all the ComicBase fields available to be exported. Select one of these fields, then click the “Move” button to add the field to the list of fields you’d like to export.
Balloon: This is a list of all the fields that will be exported.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬get wsGet(wdID,"ExportOrder","SelectionText")¬if it ≠ empty then¬ if it ≠ "< Blank Field >" then¬ wsSet wdID,"7","Name", "<< Move"¬ else¬ wsSet wdID,"7","Name", "Remove"¬ end if¬ ¬ wsSet wdID,"7","Disabled", "False"¬end if¬¬--end mouseUp
ItemType: POP
Rect: 102,223,175,236
TextFont: Geneva
TextSize: 9
Name: ItemSeparator
Text: Tab¬Space¬Return¬-¬Other…
TitleItem: 4
Balloon: This is the character that will be used to separate different fields of a given issue. Most programs use “Tab” to separate fields.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬if objValue = "Other…" then¬ get windowScript("Other Separator")¬ if it <> empty then¬ put mapCharsToCharNames (NumToChar(line 2 of it)) into temp¬ wsSet "Export Price List","ItemSeparator","selectionText",temp¬ else¬ wsSet "Export Price List","ItemSeparator","SelectionText", "Tab"¬ end if¬end if¬--end mouseUp
ItemType: LBL
Rect: 11,222,102,234
TextFont: Geneva
TextSize: 9
TextStyle: Bold
WhiteColor: -8739,-8739,-8739
Text: Item Separator:
ItemType: POP
Rect: 368,223,441,236
TextFont: Geneva
TextSize: 9
Name: RecordSeparator
Text: Tab¬Space¬Return¬-¬Other…
TitleItem: 6
Balloon: This is the character that will be used to mark the end of a given issue (record) in the export file. Most programs use “Return” to mark the end of a record.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬if objValue = "Other…" then¬ get windowScript("Other Separator")¬ if word 1 of it <> empty then¬ put mapCharsToCharNames (NumToChar(line 2 of it)) into temp¬ wsSet "Export Price List","RecordSeparator","selectionText",temp¬ else¬ wsSet "Export Price List","RecordSeparator","SelectionText", "Return"¬ end if¬end if¬--end mouseUp
ItemType: LBL
Rect: 264,222,368,234
TextFont: Geneva
TextSize: 9
TextStyle: Bold
WhiteColor: -8739,-8739,-8739
Text: Record Separator:
ItemType: PUSH
Rect: 173,31,277,51
AutoSize: FALSE
Name: Move >>
DefaultItem: TRUE
Balloon: If the name of this button is “Move >>” Clicking here to add the selected field to the list of fields to be exported.¬¬If the name is “<< Move”, clicking here will remove that field from the list of fields to be exported.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global serialNum¬¬if objName = "Move >>" then¬ put wsGet(wdID,"AvailableForExport","Text") into origListText¬ put wsGet(wdID,"AvailableForExport","Selection") into ExportSelectLine¬ put line ExportSelectLine of origListText into theSelectedItem¬ if theSelectedItem ≠ empty then¬ put wsGet(wdID,"ExportOrder","Text") into ExportList¬ delete line (ExportSelectLine) of origListText¬ wsSet wdID,"AvailableForExport","Text",origListText¬ ¬ if ExportList = empty then¬ wsSet wdID,"ExportOrder","Text", (theSelectedItem)¬ else¬ wsSet wdID,"ExportOrder","Text", (ExportList & return & theSelectedItem)¬ end if¬ ¬ if (line ExportSelectLine of origListText <> "") then¬ wsSet wdID, "AvailableForExport","Selection",ExportSelectLine¬ else -- No selection left (at end of list, etc.)¬ if ExportSelectLine > 1 then¬ wsSet wdID, "AvailableForExport","Selection",ExportSelectLine - 1¬ else -- nothing left in list¬ wsSet wdID, 7,"Disabled",True¬ end if¬ end if¬ ¬ if serialNum <> empty then wsSet wdID,"Export","Disabled", "False"¬ end if¬ ¬else -- Move back to original list¬ put wsGet(wdID,"ExportOrder","Selection") into theSelectedLine¬ put wsGet(wdID,"ExportOrder","Text") into ExportList¬ put line theSelectedLine of ExportList into theSelectedItem¬ ¬ if theSelectedItem ≠ empty then¬ put wsGet(wdID,"AvailableForExport","Text") into origListText¬ delete line (theSelectedLine) of ExportList¬ wsSet wdID,"ExportOrder","Text", ExportList¬ if theSelectedItem <> "< Blank Field >" then¬ put the number of lines of origListText into numAvailLines¬ if numAvailLines > 0 then¬ put return & theSelectedItem after origListText¬ else¬ put theSelectedItem after origListText ¬ end if¬ wsSet wdID,"AvailableForExport","Text",origListText¬ end if ¬ ¬ if word 1 of line theSelectedLine of ExportList <> "" then¬ wsSet wdID, "ExportOrder","Selection",theSelectedLine¬ else¬ if theSelectedLine > 1 then ¬ wsSet wdID, "ExportOrder","Selection",theSelectedLine - 1¬ else -- nothing left in list¬ wsSet wdID, 7,"Disabled",True¬ end if¬ end if¬ end if¬ ¬ wsSet wdID,"Export","Disabled", ((ExportList = empty) or (serialNum = empty))¬end if¬--end mouseUp¬¬¬¬¬¬¬¬¬¬¬¬
ItemType: PUSH
Rect: 174,189,278,209
AutoSize: FALSE
Name: Cancel
CancelItem: TRUE
AutoClose: TRUE
Balloon: Click here to cancel exporting.
ItemType: PUSH
Rect: 174,163,278,183
AutoSize: FALSE
Disabled: TRUE
Name: Export
AutoClose: TRUE
Balloon: Click here to begin exporting the selected fields.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬Global gExportFields, gAvailableExportFields¬¬put wsGet(wdID,"ExportOrder","Text") into gExportFields¬put wsGet(wdID,"AvailableForExport","Text") into gAvailableExportFields¬--end mouseUp
ItemType: PUSH
Rect: 174,63,278,83
Name: Add Blank >>
Balloon: Click here to add a blank field to the list of fields to be exported.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global serialNum¬¬put "< Blank Field >" into theSelectedItem¬put wsGet(wdID,"ExportOrder","Text") into ExportList¬¬if ExportList = empty then put (theSelectedItem) into ExportList¬else put return & theSelectedItem after ExportList¬¬wsSet wdID,"ExportOrder","Text", (ExportList)¬get "AvailableForExport_Selection:0" & return¬if serialNum <> empty then put "OK_Disabled:False" & return after it¬Wsset wdID,0,"Properties",it¬--end mouseUp
Balloon: This is the style in which the exported price list will be formatted. Report Format lists shows the title name only once per title; Spreadhsheet-Database format lists the title name on each line.
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬if objValue = "Other…" then¬ get windowScript("Other Separator")¬ if it <> empty then¬ put mapCharsToCharNames (NumToChar(line 2 of it)) into temp¬ wsSet "Export Price List","ItemSeparator","selectionText",temp¬ else¬ wsSet "Export Price List","ItemSeparator","SelectionText", "Tab"¬ end if¬end if¬--end mouseUp
ItemType: CHK
Rect: 263,243,408,255
TextFont: Geneva
TextSize: 9
WhiteColor: -8739,-8739,-8739
Name: Export only issues in stock
Balloon: Check this box if you want the export file to only include records for the issues you own at least one of. If the box is unchecked, all records will be listed.
ItemType: CHK
Rect: 263,260,368,272
TextFont: Geneva
TextSize: 9
WhiteColor: -8739,-8739,-8739
Name: Include field titles
Balloon: Check this box if you want precede the data being exported with the title of each export field.
ItemType: LBL
Rect: 11,261,92,273
TextFont: Geneva
TextSize: 9
TextStyle: Bold
WhiteColor: -8739,-8739,-8739
Text: Export Titles:
ItemType: RAD
Rect: 89,261,126,273
TextFont: Geneva
TextSize: 9
WhiteColor: -8739,-8739,-8739
Name: All
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global gTitlesToExportType¬¬put "All" into gTitlesToExportType¬--end mouseUp
ItemType: RAD
Rect: 129,261,228,273
TextFont: Geneva
TextSize: 9
WhiteColor: -8739,-8739,-8739
Name: Selected Titles…
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬global selectedTitlesIndex¬global gTitlesToExportType¬¬set cursor to watch¬put objName into gTitlesToExportType¬get windowScript("Select Titles","Export which titles?")¬if it <> empty then¬ put xlate(selectedTitleNums,comma,return) & return into selectedTitlesIndex¬end if¬¬wsSet "Export Price List","Export","Disabled",(selectedTitlesIndex = empty)¬--end mouseUp